import employees from '@/utils/constant/employees'
import moment from 'moment'
import store from '@/store'

export const tranHireType = function (value) {
  const obj = employees.hireType.find(item => {
    return item.id === +value
  })
  return obj ? obj.value : ''
}

export const formatDate = function (value) {
  return moment(value).format('YYYY-MM-DD')
}

// 按钮权限
export const btnPerm = function (value) {
  const arr = store.getters.userInfo.roles.points || []
  console.log(arr)
  console.log(value)
  return !arr.includes(value)
}
